/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.prerecieve.entity;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.modules.base.entity.cars.Tcar;
import com.jeesite.modules.base.entity.fixedexpense.FixedExpense;
import org.hibernate.validator.constraints.Length;

import java.util.Date;

/**
 * 预收款Entity
 * @author wsm
 * @version 2021-03-22
 */
@Table(name="t_advances_received_estimated", alias="a", columns={
		@Column(name="advances_received_estimated_id", attrName="advancesReceivedEstimatedId", label="预计收款明细ID", isPK=true),
		@Column(name="frame_number", attrName="frameNumber", label="车架号"),
		@Column(name="advances_received_type", attrName="advancesReceivedType", label="预收款类型"),
		@Column(name="estimated_received_amount", attrName="estimatedReceivedAmount", label="预计收款金额"),
		@Column(name="advances_received_id", attrName="advancesReceivedId.advancesReceivedId", label="预收款ID"),
		@Column(name="received_sum_actual", attrName="receivedSumActual", label="收款合计"),
		@Column(name="received_amount_actual", attrName="receivedAmountActual", label="已核销金额"),
		@Column(name="locked_amount", attrName="lockedAmount", label="锁定金额"),
		@Column(name="used_amount", attrName="usedAmount", label="可用金额"),
		@Column(name="received_amount_estimated", attrName="receivedAmountEstimated", label="未核销金额"),
		@Column(name="row_number", attrName="rowNumber", label="服务订单行号"),
		@Column(name="car_name", attrName="carName1", label="车辆名称"),
	}, joinTable={
		@JoinTable(type= JoinTable.Type.LEFT_JOIN, entity= FixedExpense.class, attrName="fixedExpense", alias="b",
				on="b.fixed_expense_id = a.advances_received_type", columns={
				@Column(name="fixed_expense_id", label="类型id", isPK=true),
				@Column(name="fixed_expense_name", label="类型名称"),
		}),
}, orderBy="a.advances_received_estimated_id ASC"
)
public class TadvancesReceivedEstimated extends DataEntity<TadvancesReceivedEstimated> {

	private static final long serialVersionUID = 1L;
	private String advancesReceivedEstimatedId;		// 预计收款明细ID
	private String frameNumber;		// 车架号
	private String carName1;		// 车辆名称
	private String advancesReceivedType;		// 预收款类型
	private Double estimatedReceivedAmount;		// 预计收款金额
	private TadvancesReceived advancesReceivedId;		// 预收款ID 父类
	private Double receivedSumActual;
	private Double receivedAmountActual;
	private Double receivedAmountEstimated;
	private String advancesReceivedTypeName;
	private Long rowNumber;		// 服务订单行号
	private String advancesReceivedCode;
	private FixedExpense fixedExpense;

	private String carId;//临时字段，预收转账时使用
	private String carName;//临时字段，预收转账时使用
	private Double lockedAmount;
	private Double usedAmount;
	private Date date;
	private String dateStr;

	public Double getLockedAmount() {
		return lockedAmount;
	}

	public void setLockedAmount(Double lockedAmount) {
		this.lockedAmount = lockedAmount;
	}

	public Double getUsedAmount() {
		return usedAmount;
	}

	public void setUsedAmount(Double usedAmount) {
		this.usedAmount = usedAmount;
	}

	public FixedExpense getFixedExpense() {
		return fixedExpense;
	}

	public void setFixedExpense(FixedExpense fixedExpense) {
		this.fixedExpense = fixedExpense;
	}

	public String getAdvancesReceivedCode() {
		return advancesReceivedCode;
	}

	public void setAdvancesReceivedCode(String advancesReceivedCode) {
		this.advancesReceivedCode = advancesReceivedCode;
	}

	public Long getRowNumber() {
		return rowNumber;
	}

	public void setRowNumber(Long rowNumber) {
		this.rowNumber = rowNumber;
	}

	public String getCarName1() {
		return carName1;
	}

	public void setCarName1(String carName1) {
		this.carName1 = carName1;
	}

	public String getAdvancesReceivedTypeName() {
		return advancesReceivedTypeName;
	}

	public void setAdvancesReceivedTypeName(String advancesReceivedTypeName) {
		this.advancesReceivedTypeName = advancesReceivedTypeName;
	}

	public String getCarId() {
		return carId;
	}

	public void setCarId(String carId) {
		this.carId = carId;
	}

	public String getCarName() {
		return carName;
	}

	public void setCarName(String carName) {
		this.carName = carName;
	}
	public TadvancesReceivedEstimated() {
		this(null);
	}

	public Double getReceivedSumActual() {
		return receivedSumActual;
	}

	public void setReceivedSumActual(Double receivedSumActual) {
		this.receivedSumActual = receivedSumActual;
	}

	public Double getReceivedAmountActual() {
		return receivedAmountActual;
	}

	public void setReceivedAmountActual(Double receivedAmountActual) {
		this.receivedAmountActual = receivedAmountActual;
	}

	public Double getReceivedAmountEstimated() {
		return receivedAmountEstimated;
	}

	public void setReceivedAmountEstimated(Double receivedAmountEstimated) {
		this.receivedAmountEstimated = receivedAmountEstimated;
	}

	public TadvancesReceivedEstimated(TadvancesReceived advancesReceivedId){
		this.advancesReceivedId = advancesReceivedId;
	}

	public String getAdvancesReceivedEstimatedId() {
		return advancesReceivedEstimatedId;
	}

	public void setAdvancesReceivedEstimatedId(String advancesReceivedEstimatedId) {
		this.advancesReceivedEstimatedId = advancesReceivedEstimatedId;
	}

	@Length(min=0, max=100, message="车架号长度不能超过 100 个字符")
	public String getFrameNumber() {
		return frameNumber;
	}

	public void setFrameNumber(String frameNumber) {
		this.frameNumber = frameNumber;
	}

	@Length(min=0, max=2, message="预收款类型长度不能超过 2 个字符")
	public String getAdvancesReceivedType() {
		return advancesReceivedType;
	}

	public void setAdvancesReceivedType(String advancesReceivedType) {
		this.advancesReceivedType = advancesReceivedType;
	}

	public Double getEstimatedReceivedAmount() {
		return estimatedReceivedAmount;
	}

	public void setEstimatedReceivedAmount(Double estimatedReceivedAmount) {
		this.estimatedReceivedAmount = estimatedReceivedAmount;
	}

	@Length(min=0, max=64, message="预收款ID长度不能超过 64 个字符")
	public TadvancesReceived getAdvancesReceivedId() {
		return advancesReceivedId;
	}

	public void setAdvancesReceivedId(TadvancesReceived advancesReceivedId) {
		this.advancesReceivedId = advancesReceivedId;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public String getDateStr() {
		return dateStr;
	}

	public void setDateStr(String dateStr) {
		this.dateStr = dateStr;
	}
}
